<?
	// Configura si trabaja con AJaX o No
		$aBrowser = _get_browser();
		$bAjax = (($aBrowser['browser'] == 'IE' && $aBrowser['version'] <= 5) ) ? false:true;
		define ( 'MODO_AJAX_HABILITADO', $bAjax);
		define ( 'ACTION_BACK' , -1);
		define ( 'ACTION_NEXT' , -2);
		define ( 'ACTION_NONE' , -3);
	// OutPut Type
		define ( 'AMBIENTES_PARAM','VESPG');
	// Modos de las Acciones
		define ( 'VENTANA_PRINCIPAL' ,1  );
		define ( 'POPUP_CON_ACTUALIZACION' ,2  );
		define ( 'POPUP' ,3  );
		define ( 'DIV_POPUP', 4  );
		define ( 'VENTANA_SECUNDARIA' ,5  );
		define ( 'SIN_VENTANA' ,6  );
		define ( 'IFRAME' ,7  );
		
		define ( 'ACCION_CRITICA' ,1  );
		define ( 'ACCION_RECUPERABLE' ,2  );
		define ( 'ACCION_NORMAL' ,3  );
	// PARAMETERS
		define ( 'PARAM_MODULE',	  'mo'  );
		define ( 'PARAM_ACTION',	  'ac'  );
		define ( 'PARAM_TASK',		  'ts'  );
		define ( 'PARAM_LANGUAGE',	  'lang');
		define ( 'PARAM_OUTPUT',	  'ou'  );
		define ( 'PARAM_SUBMODULE',	  'sm'  );
		define ( 'PARAM_TARGET',	  'tr'  );
		define ( 'PARAM_REFRESH',	  'rf'  );
		define ( 'PARAM_CLASS',		  'cl'  );
		define ( 'PARAM_METHOD',	  'mt'  );
		define ( 'PARAM_MODE',		  'me'  );
		define ( 'PARAM_OPTIONS',	  'op'  );
		define ( 'PARAM_CALENDARVIEW','cw'  );
		define ( 'PARAM_KEYTREE',	  'kt'  );
		define ( 'PARAM_KEYCALENDAR', 'kc'  );
		define ( 'PARAM_KEYLOOKUP',	  'kl'  );
		define ( 'PARAM_MENU',		  'mn'  );
		define ( 'PARAM_INDEX',		  'in'  );
		define ( 'PARAM_FIELD',		  'fl'  );
		define ( 'PARAM_ORDERBY',	  'or'  );
		define ( 'PARAM_FROM',		  'fr'  );
		define ( 'PARAM_TAB',		  'se'  );
		define ( 'PARAM_CONTAINER',	  'co'  );

		$oModBase = new Modulo( "base");
	// Carga las Bibliotecas que publica
	/// Setea la Hoja de Estilos
		$oModBase->addStyleSheet( "contenido.css" );
		$oModBase->addStyleSheet( "base.css" );
	/// Pone los Templates
		$cIncPop = ( $oModBase->nMode == VENTANA_PRINCIPAL || $oModBase->nMode == VENTANA_SECUNDARIA )  ? "" : ( $oModBase->nMode == IFRAME  ? "iframe_" : "pop_" );
		$oModBase->setTemplateHead( "head_" . $cIncPop . "inc.php" );
		$oModBase->setTemplateBody( "body_" . $cIncPop . "inc.php" );
		$oModBase->setTemplateFoot( "foot_" . $cIncPop . "inc.php" );
	// $aModule es un Array Global que usan los modulo_ini y el Index para dejar y recibir el objeto que construye cada modulo_ini.
		$aModule['base'] = $oModBase;

function _get_browser()
	{
	  $browser = array (
	   "MSIE",           // parent
	   "OPERA",
	   "MOZILLA",        // parent
	   "NETSCAPE",
	   "FIREFOX",
	   "SAFARI"
	  );

	  $info['browser'] = "OTHER";

	  foreach ($browser as $parent)
	  {
	   if ( ($s = strpos(strtoupper($_SERVER['HTTP_USER_AGENT']), $parent)) !== FALSE )
	   {
		 $f = $s + strlen($parent);
		 $version = substr($_SERVER['HTTP_USER_AGENT'], $f, 5);
		 $version = preg_replace('/[^0-9,.]/','',$version);

		 $info['browser'] = $parent;
		 $info['version'] = $version;
	   }
	  }
	  return $info;
	}
?>